
#include <stdio.h>
#include "hi_types_base.h"
void mq3_str_format(char* payload ,int id,hi_u16  aout,hi_u32 dout ){
    char strFormat[] = "{\"type\":\"mq3\",\"id\":%d,\"aout\":%u,\"dout\":%u}" ;
    sprintf(payload,strFormat,id,aout,dout);
}



void belt_str_format(char* payload ,int id,hi_u32 state ){
    char strFormat[] = "{\"type\":\"belt\",\"id\":%d,\"state\":%u}";
    sprintf(payload,strFormat,id,state);
}